package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Sign;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SignMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Sign record);

    Sign selectByPrimaryKey(Long id);

    List<Sign> selectAll();

    int updateByPrimaryKey(Sign record);

    /**
     * 查询是否有签到
     * @param userId
     * @param date 时间
     * @return
     */
    Sign getSignByUserId(@Param("userId") Long userId, @Param("date") String date);

    int selectSignCount(Long userId);

}